﻿<UserControl x:Class="FriendStream.Controls.ModernFriendStreamControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="300" 
             Margin="0,15,0,0" FontFamily="pack://application:,,,/Fonts/#Droid Sans" Opacity="0" Cursor="Hand"
             MouseLeftButtonUp="UserControlMouseLeftButtonUp">
    <UserControl.RenderTransform>
        <ScaleTransform x:Name="ScaleTransform" ScaleX="1.2" ScaleY="{Binding ElementName=ScaleTransform, Path=ScaleX}"/>
    </UserControl.RenderTransform>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UserControl.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation x:Name="ScaleAnim" Storyboard.TargetProperty="(RenderTransform).ScaleX" From="1.2" To="1" Duration="0:0:0.3" DecelerationRatio="0.3"/>
                    <DoubleAnimation x:Name="OpacityAnim" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.3"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <Grid>
        <DockPanel Margin="0,0,10,15">
            <Grid Width="50" Height="50" VerticalAlignment="Top" Margin="8,0,10,0" DockPanel.Dock="Left">
                <Rectangle Stroke="Gray"/>
                <Image Name="FeedImage" Stretch="UniformToFill"/>
                <Image Name="OverlayIcon" Source="/Resources/facebook_overlay.png" Width="16" Height="16" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
            </Grid>
            <StackPanel>
                <TextBlock FontSize="14" TextWrapping="Wrap" LineStackingStrategy="BlockLineHeight" LineHeight="16">
                    <Run Name="UsernameText" Text="Username" Foreground="#73d4fc"/>
                    <Run Name="MessageText" Text="Text" Foreground="White"/>
                </TextBlock>
                <DockPanel Name="NamePanel" Margin="0,5,0,0" Visibility="Collapsed">
                    <Image Name="NamePicture" Width="50" Height="50"  Stretch="UniformToFill" Margin="0,0,8,0" Visibility="Collapsed"/>
                    <TextBlock Name="NameText" Foreground="#73d4fc" FontSize="14" TextWrapping="Wrap"/>
                </DockPanel>
                <TextBlock Visibility="Collapsed" Name="DescriptionText" Margin="0,10,0,0"  FontSize="14" TextWrapping="Wrap" Foreground="White"/>
                <TextBlock Name="DateBox" Foreground="LightGray" FontStyle="Italic" FontFamily="pack://application:,,,/Fonts/#Droid Serif" Margin="0,3,0,0"/>
                <StackPanel Orientation="Horizontal" Margin="0,3,0,0">
                    <Image Name="CommentsIcon" Source="/Resources/comments_icon.png" Width="12" Margin="0,0,3,0" Visibility="Collapsed"/>
                    <TextBlock Name="CommentsBox" Foreground="LightGray" Visibility="Collapsed" TextWrapping="Wrap" Margin="0,2,5,0" VerticalAlignment="Center"/>
                    <Image Name="LikesIcon" Source="/Resources/likes_icon.png" Width="12" Margin="0,0,3,0" Visibility="Collapsed"/>
                    <TextBlock Name="LikesBox" Foreground="LightGray" Visibility="Collapsed" Margin="0,2,0,0" TextWrapping="Wrap" VerticalAlignment="Center"/>
                </StackPanel>
            </StackPanel>
        </DockPanel>
        <Rectangle Height="1" Fill="#444444" Margin="0,0,0,1" Opacity="0.7" VerticalAlignment="Bottom"/>
        <Rectangle Height="1" Fill="#b8b8b8" Opacity="0.7" VerticalAlignment="Bottom"/>
    </Grid>
</UserControl>
